<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="_fragments::head(~{::title})">
    <meta charset="utf-8">
    <!-- 设置移动端更好的适配以及预览 -->
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <title>归档</title>
    <!-- 引入semantic-ui的css和js -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css">
    <link rel="stylesheet" href="../static/css/me.css"/>
</head>
<body>
<!-- 导航栏部分 -->
<nav th:replace="_fragments::menu(4)" class="ui inverted attached segment m-padded-tb-mini m-shadow-small">
    <!-- inverted是反转的意思，默认效果是圆角的，我们可以使用attached是去除圆角 -->
    <div class="ui container">
        <div class="ui inverted secondary stackable menu">
            <h2 class="ui blue header item">Blog</h2>
            <a href="#" class="item menu-item m-mobile-hide"><i class="home icon"></i>首页</a>
            <a href="#" class="item menu-item m-mobile-hide"><i class="idea icon"></i>分类</a>
            <a href="#" class="item menu-item m-mobile-hide"><i class="tags icon"></i>标签</a>
            <a href="#" class="item menu-item m-mobile-hide"><i class="clone icon"></i>归档</a>
            <a href="#" class="item menu-item m-mobile-hide"><i class="info icon"></i>关于我</a>
            <div class="right item m-mobile-hide">
                <div class="ui icon inverted transparent input">
                    <input type="text" placeholder="Search..."/>
                    <i class="search  icon"></i>
                </div>
            </div>
        </div>
    </div>
    <!--绑定css样式:手机端显示，电脑端隐藏
        绑定js：当点击的时候，上面的菜单栏显示和隐藏进行切换。
    -->
    <a href="#" class="ui menu toggle black icon button m-top-right m-mobile-show">
        <i class="sidebar icon"></i>
    </a>
</nav>


<!-- 存放主体内容 -->
<div class="m-padded-tb-big m-container-small animated fadeIn">
    <div class="ui container">
        <!--header-->
        <div class="ui top attached padded segment">
            <div class="ui middle aligned two column grid">
                <div class="column">
                    <h3 class="ui blue header">归档</h3>
                </div>
                <div class="right aligned column">
                    共<h3 class="ui orange header m-inline-block m-text-thin" th:text="${blogCount}">114</h3>篇
                </div>
            </div>
        </div>

        <!--2020年-->
        <th:block th:each="entry:${archiveMap}">
            <h2 class="ui center aligned header" th:text="${entry.key}">2020</h2>
            <div class="ui fluid vertical menu">
                <a href="#" th:href="@{/blog/{id}(id=${blog.id})}" target="_blank" class="item"
                   th:each="blog:${entry.value}">
						<span>
							<i class="mini blue circle icon"></i>&nbsp;&nbsp;<span
                                th:text="${blog.title}">失败是成功之母</span>
							<div class="ui m-padded-mini blue basic left pointing label"
                                 th:text="${#dates.format(blog.updateTime,'MM-dd')}">9月3日</div>
						</span>
                    <div class="ui orange basic left pointing label" th:text="${blog.flag}">原创</div>
                </a>
            </div>
        </th:block>

    </div>
</div>

<br/>
<br/>
<br/>
<br/>
<br/>
<br/>


<!-- 存放底部footer -->
<!-- vertical:垂直的，默认情况下segment是圆角，-->
<footer th:replace="_fragments::footer" class="ui inverted vertical segment m-padded-tb-big">
    <!--设置一个居中的容器-->
    <div class="ui center aligned container">
        <!--grid:垂直划分，默认是16份；
            inverted divided：采用分割线  -->
        <div class="ui inverted stackable divided grid">
            <!--存放左边的二维码-->
            <diV class="three wide column">
                <div class="ui inverted link list">
                    <div class="item">
                        <!--rounded：设置图片为圆角-->
                        <img src="../static/images/wechat.jpg" th:src="@{/images/wechat.jpg}" class="ui rounded image"
                             alt="图片加载失败" style="width: 100px;height: 100px;"/>
                    </div>
                </div>
            </diV>
            <!--存放最新博客的信息-->
            <diV class="three wide column">
                <h4 class="ui inverted header  m-text-spaced m-opacity-mini">最新博客</h4>
                <div class="ui inverted link list">
                    <a href="#" class="item">用户故事</a>
                    <a href="#" class="item">早期的鸟儿有虫吃</a>
                    <a href="#" class="item">早期的虫儿被鸟吃</a>
                </div>
            </diV>
            <!--存放联系我的相关信息-->
            <diV class="three wide column">
                <h4 class="ui inverted header m-text-spaced m-opacity-mini">联系我</h4>
                <div class="ui inverted link list">
                    <a href="#" class="item">Email：p15194420545@163.com</a>
                    <a href="#" class="item">QQ：1753853993</a>
                </div>
            </diV>
            <!--右侧的论坛介绍-->
            <diV class="seven wide column">
                <h4 class="ui inverted header m-text-spaced m-opacity-mini">论坛show</h4>
                <p class=" m-opacity-mini">这是我的个人博客，会分享一些关于编程，写作，思考相关的内容，希望可以给来到这里的人有所帮助...</p>
            </diV>
        </div>
        <!---->
        <div class="ui inverted section divider"></div>
        <p class="m-text-thin m-text-spaced m-opacity-tiny">Copyright © 2016 - 2017 Lirenmi Designed by Lirenmi</p>
    </div>

</footer>


<!-- js文件依赖jquery，因此我们需要引入jquery -->
<th:block th:replace="_fragments::script">
    <script src="https://cdn.jsdelivr.net/npm/jquery@3.2.1/dist/jquery.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.js"></script>
</th:block>

<script type="text/javascript">
    $('.menu.toggle').click(function () {
        $('.menu-item').toggleClass('m-mobile-hide');
    });
</script>
</body>
</html>
